package com.hbut.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ResultCode {
    //操作唱功
    SUCCESS (1000, "操作成功"),
    //服务器内部错误，友好提⽰
    ERROR (2000, "服务繁忙请稍后重试"),
    //操作失败，但是服务器不存在异常
    FAILED (3000, "操作失败"),
    FAILED_UNAUTHORIZED (3001, "未授权"),
    FAILED_PARAMS_VALIDATE (3002, "参数校验失败"),
    FAILED_NOT_EXISTS (3003, "资源不存在"),
    FAILED_ALREADY_EXISTS (3004, "资源已存在"),
    AILED_USER_EXISTS (3101, "⽤⼾已存在"),
    FAILED_USER_NOT_EXISTS (3102, "用户不存在"),
    FAILED_LOGIN (3103, "⽤⼾名或密码错误"),
    FAILED_USER_BANNED (3104, "您已被列⼊⿊名单, 请联系管理员."),
    ERROR_PHONE(3105, "手机号格式有误" ),
    EXAM_START_TIME_BEFORE_CURRENT_TIME (3201, "竞赛开始时间不能早于当前时间"),
    EXAM_START_TIME_AFTER_END_TIME (3202, "竞赛结束时间不能晚于当前时间"),
    QUESTION_NOT_EXIST(3203,"题目不存在" ),
    EXAM_STARTED(3205,"竞赛已经开始,无法进行操作" ),
    EXAM_QUESTION_NOT_EXIST(3206,"竞赛未添加题目" ),
    EXAM_NOT_PUBLISH(3207,"竞赛未发布" ),
    EXAM_IS_PUBLISH(3208,"竞赛已经发布,无法进行编辑删除操作!!"),
    FAILED_TIME_LIMIT(3301,"发送次数已达上限,无法再次发送" ),
    FAILED_FREQUENT(3302,"发送过于频繁,请稍后重新发送" ),
    FAILED_SEND_CODE(3303, "短信发送失败"),
    FAILED_INVALID_CODE(3304,"验证码无效"),
    FAILED_ERROR_CODE(3305,"验证码错误"),
    USER_EXAM_HAS_ENTERED(3401,"用户已报名,无需重复报名");

    /**
     * 状态码
     */
    private final int code;
    /**
     * 状态描述
     */
    private final String msg;
}
